<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	// 获得本项目的地址(例如: http://localhost:8080/MyApp/)赋值给basePath变量
	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
	// 将 "项目路径basePath" 放入pageContext中，待以后用EL表达式读出。
	pageContext.setAttribute("basePath",basePath);
%>
		<form action="${param.action}" method="post" id="id_cade_form" style="float:left;width:550px;">
			<input type="hidden" name="id" value="${model.id}">
			<div class="custom-form">
				<ul>
					<li><span>身份证号码：</span><input name="idNo" id="idNo"  type="text"   value="${model.idNo}" data-options="required:true,validType:['length[1,18]','htmlUnescape']" /></li>
					<li><span>姓名：</span><input id="name" name="name" type="text"  value="${model.name }" data-options="required:true" /></li>
					<li><span>性别：</span><input id="sex" name="sex" type="text"  value="${model.sex }" data-options="required:true" /></li>
					<li><span>民族：</span><input id="nation" name="nation" type="text"  value="${model.nation}" data-options="required:true<%-- ,url:'${pageScope.basePath}root/nation/combo',panelwidth:'auto' --%>" /></li>
					<li><span>生日：</span><input id="born" name="born" type="text"  value="${model.born}" data-options="required:true" /></li>
					<li><span>地址：</span><input id="address" name="address" type="text"  value="${model.address }" data-options="required:true" /></li>
					<li><span>有效期起：</span><input id="userLifeB" name="userLifeB" type="text"  value="${model.userLifeB }" data-options="required:true" /></li>
					<li><span>有效期止：</span><input id="userLifeE" name="userLifeE" type="text"  value="${model.userLifeE }" data-options="required:true" /></li>
					<li><span>发证机关：</span><input id="polic" name="police" type="text"  value="${model.police }" data-options="required:true" /></li>
					<li><span>照片：</span><input id="photo" name="photo" id="photo1"  value="" data-options="buttonText:'选择',editable:false" /></li>
				</ul>
			</div>
		</form>
		<div style="width:200px;float:left;margin:15px 0 0 0;">
			<img  src="${pageScope.basePath}hrm/idCade/imageStream?idNo=${model.idNo}" width="120" height="160" style="border:1px solid black;margin-left:15px;"/>
		</div>


<script type="text/javascript">

$(function(){
	$('#name').textbox();
	$('#sex').textbox();
	$('#nation').textbox();
	$('#born').textbox();
	$('#address').textbox();
	$('#userLifeB').textbox();
	$('#userLifeE').textbox();
	$('#polic').textbox();
	$('#photo').filebox();
	$('#idNo').textbox();
	var idInp=$('#idNo').textbox().next('span').find('input');
	idInp.focus();
	
});


</script>
